Switch database inside psql?

Поиск
Список
Период
Сортировка
От lynch@lscorp.com (Richard Lynch)
Тема Switch database inside psql?
Дата
Msg-id v02140b77b1efa8a7d563@[207.152.64.133]
обсуждение исходный текст
Ответы Re: [GENERAL] Switch database inside psql?  (Maarten Boekhold <maartenb@dutepp2.et.tudelft.nl>)
Список pgsql-general
I'd like to have a single file.sql that will create the same database and
some tables on several different systems.  Is it possible to 'switch' to a
different database after one does the create database?  So that tables
created would go in the new database and not template1?  Or does this
already happen and is just not documented?...  I'd be guessing a big no on
the latter, since the psql prompt still says 'template1' after I create a
database...

I get an error message when I try createdb from the command line, but once
I've done psql -u, I can do it, so I guess if I had to do this from some
sort of Perl/sed/awk/??? script (none of which I could write anyway), I'd
need to know how to convince createdb that I *am* a valid database-creator,
by golly.

--
--
-- "TANSTAAFL" Rich lynch@lscorp.com



В списке pgsql-general по дате отправления:

Предыдущее
От: "Jeff Hoffmann"
Дата:
Сообщение: help with creating an opclass for a new data type
Следующее
От: "John Smith"
Дата:
Сообщение: help with Pg.pm is needed